﻿<Page
    x:Class="Win8CalendarDemo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Win8CalendarDemo"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:win8Controls="using:Win8Controls"
    mc:Ignorable="d">
    <Page.Resources>
        <local:ViewModel x:Key="ViewModel"/>
    </Page.Resources>
    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <win8Controls:Calendar 
            x:Name="Calendar"
            DatePropertyNameForDatesSource="CurrentDate" 
            DatesSource="{Binding Source={StaticResource ViewModel}, Path=TestItems}"/>
        <TextBlock Text="{Binding ElementName=Calendar, Path=SelectedDate, Mode=TwoWay}" Grid.Row="1" FontSize="30"></TextBlock>
    </Grid>
</Page>
